package com.augmentum.oes.exception;

import com.augmentum.oes.Constants;

/**
 * BaseException general methods
 */
public class BaseException extends RuntimeException {
    private static final long serialVersionUID = -10084158873644165L;
    private int errorCode;

    public BaseException(int errorCode) {
        super(Constants.NO_CONTENT);
        setErrorCode(errorCode);
    }

    public BaseException(String errorMessage) {
        super(errorMessage);
        setErrorCode(5000);
    }

    public BaseException(int errorCode, String errorMessage) {
        super(errorMessage);
        setErrorCode(errorCode);
    }

    public BaseException(int errorCode, String errorMessage, Throwable throwable) {
        super(errorMessage, throwable);
        setErrorCode(errorCode);
    }

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }
    
}
